var map = null;
var marker = null;
var info = null;

function initialize() {	
	var myOptions = {
			center: new google.maps.LatLng(32.777700, 35.02293),
			zoom: 17,
			mapTypeControl: false,
			mapTypeId: google.maps.MapTypeId.ROADMAP
     };
     map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
     
//Industrial Eng Cooper Bldg     
     var iemc = new google.maps.Polygon({
    	 id: 'iemc',
    	 path: [
    	     new google.maps.LatLng(32.774383, 35.023995),
    	     new google.maps.LatLng(32.774394, 35.023461),
    	     new google.maps.LatLng(32.774142, 35.023451),
    	     new google.maps.LatLng(32.774148, 35.023228),
    	     new google.maps.LatLng(32.77404, 35.023228),
    	     new google.maps.LatLng(32.774042, 35.023984)
    	     ]
     });
     google.maps.event.addListener(iemc, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.774200, 35.023650),
    	      map: map,
    	      icon: 'img/university.png'
    	 });
     })
     iemc.setMap(map);
     
//Industrial Eng Bloomfield Bldg     
     var iemb = new google.maps.Polygon({
    	 id: 'iemb',
    	 path: [
    	     new google.maps.LatLng(32.774247, 35.024247),
    	     new google.maps.LatLng(32.774069, 35.024025),
    	     new google.maps.LatLng(32.773875, 35.024237),
    	     new google.maps.LatLng(32.774055, 35.024459)
    	     ]
     });
     google.maps.event.addListener(iemb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.774046, 35.024234),
    	      map: map,
    	      icon: 'img/university.png'
    	 });	  
     })
     iemb.setMap(map);

//Mechanical Eng Lady Davis Bldg
     var meld = new google.maps.Polygon({
    	 id: 'meld',
    	 path: [
    	     new google.maps.LatLng(32.77473, 35.022485),
    	     new google.maps.LatLng(32.774732, 35.022324),
    	     new google.maps.LatLng(32.774044, 35.022311),
    	     new google.maps.LatLng(32.774042, 35.023121),
    	     new google.maps.LatLng(32.774362, 35.023121),
    	     new google.maps.LatLng(32.774364, 35.022971),
    	     new google.maps.LatLng(32.774184, 35.02296),
    	     new google.maps.LatLng(32.774193, 35.02248)
    	     ]
     });
     google.maps.event.addListener(meld, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.774121, 35.022579),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     meld.setMap(map);

//Architecture Segoe Bldg
     var arch = new google.maps.Polygon({
    	 id: 'arch',
    	 path: [
    	     new google.maps.LatLng(32.778473, 35.022933),
    	     new google.maps.LatLng(32.778196, 35.022574),
    	     new google.maps.LatLng(32.778119, 35.022654),
    	     new google.maps.LatLng(32.778119, 35.022654),
    	     new google.maps.LatLng(32.778061, 35.022413),
    	     new google.maps.LatLng(32.77797, 35.0223),
    	     new google.maps.LatLng(32.777765, 35.022517),
    	     new google.maps.LatLng(32.77825, 35.023166)
    	     ]
     });
     google.maps.event.addListener(arch, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.778063, 35.022772),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     arch.setMap(map);

//Math Amado Bldg
     var math = new google.maps.Polygon({
    	 id: 'math',
    	 path: [
    	     new google.maps.LatLng(32.778133, 35.023043),
    	     new google.maps.LatLng(32.778234, 35.023191),
    	     new google.maps.LatLng(32.777912, 35.023545),
    	     new google.maps.LatLng(32.777792, 35.023397)
    	     ]
     });
     google.maps.event.addListener(math, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.777977, 35.02329),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     math.setMap(map);
     
//Biology Bldg
     var biol = new google.maps.Polygon({
    	 id: 'biol',
    	 path: [
    	     new google.maps.LatLng(32.777319, 35.026661),
    	     new google.maps.LatLng(32.777093, 35.02649),
    	     new google.maps.LatLng(32.776987, 35.026664),
    	     new google.maps.LatLng(32.776881, 35.026592),
    	     new google.maps.LatLng(32.77675, 35.02682),
    	     new google.maps.LatLng(32.776946, 35.026972),
    	     new google.maps.LatLng(32.77708, 35.02674),
    	     new google.maps.LatLng(32.777224, 35.026844)
    	     ]
     });
     google.maps.event.addListener(biol, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.776928, 35.026764),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     biol.setMap(map);

//BioMedical Eng Bldg
     var bime = new google.maps.Polygon({
    	 id: 'bime',
    	 path: [
    	     new google.maps.LatLng(32.775571, 35.026608),
    	     new google.maps.LatLng(32.775386, 35.026397),
    	     new google.maps.LatLng(32.775435, 35.026327),
    	     new google.maps.LatLng(32.775381, 35.026265),
    	     new google.maps.LatLng(32.775325, 35.02633),
    	     new google.maps.LatLng(32.775264, 35.026246),
    	     new google.maps.LatLng(32.774941, 35.026659),
    	     new google.maps.LatLng(32.775041, 35.026788),
    	     new google.maps.LatLng(32.775289, 35.026528),
    	     new google.maps.LatLng(32.775462, 35.026737)
    	     ]
     });
     google.maps.event.addListener(bime, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.775156, 35.026523),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     bime.setMap(map);

//Material Eng Bldg
     var mtrl = new google.maps.Polygon({
    	 id: 'mtrl',
    	 path: [
    	     new google.maps.LatLng(32.775647, 35.025401),
    	     new google.maps.LatLng(32.775421, 35.025144),
    	     new google.maps.LatLng(32.775133, 35.025487),
    	     new google.maps.LatLng(32.775356, 35.025747)
    	     ]
     });
     google.maps.event.addListener(mtrl, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.775385, 35.025444),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     mtrl.setMap(map);
     
//Computer Science Taub Bldg
     var cstb = new google.maps.Polygon({
    	 id: 'cstb',
    	 path: [
    	     new google.maps.LatLng(32.778058, 35.021622),
    	     new google.maps.LatLng(32.777713, 35.021222),
    	     new google.maps.LatLng(32.777397, 35.021643),
    	     new google.maps.LatLng(32.777738, 35.022013)
    	     ]
     });
     google.maps.event.addListener(cstb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.777682, 35.021614),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     cstb.setMap(map);
     
//Humanities Bldg
     var humn = new google.maps.Polygon({
    	 id: 'humn',
    	 path: [
    	     new google.maps.LatLng(32.777668, 35.024983),
    	     new google.maps.LatLng(32.777593, 35.024894),
    	     new google.maps.LatLng(32.777361, 35.025159),
    	     new google.maps.LatLng(32.777428, 35.025242)
    	     ]
     });
     google.maps.event.addListener(humn, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.777474, 35.025087),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     humn.setMap(map);
     
//Chemistry Bldg
     var chem = new google.maps.Polygon({
    	 id: 'chem',
    	 path: [
    	     new google.maps.LatLng(32.777649, 35.026653),
    	     new google.maps.LatLng(32.778168, 35.025701),
    	     new google.maps.LatLng(32.778058, 35.025637),
    	     new google.maps.LatLng(32.777913, 35.025978),
    	     new google.maps.LatLng(32.777783, 35.025881),
    	     new google.maps.LatLng(32.77801, 35.025492),
    	     new google.maps.LatLng(32.7779, 35.025393),
    	     new google.maps.LatLng(32.777282, 35.026444),
    	     new google.maps.LatLng(32.777386, 35.026525),
    	     new google.maps.LatLng(32.777516, 35.026281),
    	     new google.maps.LatLng(32.777674,35.026404),
    	     new google.maps.LatLng(32.777571,35.026597)   	     
    	     ]
     });
     google.maps.event.addListener(chem, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.777706,35.026168),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     chem.setMap(map);
     
//Chemical Eng Bldg
     var cheb = new google.maps.Polygon({
    	 id: 'cheb',
    	 path: [
    	     new google.maps.LatLng(32.777999, 35.027917),
    	     new google.maps.LatLng(32.778536, 35.02697),
    	     new google.maps.LatLng(32.77822, 35.026701),
    	     new google.maps.LatLng(32.777695, 35.027664)
    	     ]
     });
     google.maps.event.addListener(cheb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.778064, 35.027337),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     cheb.setMap(map);

//Biotech and Food Eng Bldg
     var btfe = new google.maps.Polygon({
    	 id: 'btfe',
    	 path: [
    	     new google.maps.LatLng(32.778164, 35.026747),
    	     new google.maps.LatLng(32.778225, 35.026616),
    	     new google.maps.LatLng(32.778037, 35.02646),
    	     new google.maps.LatLng(32.777677, 35.027098),
    	     new google.maps.LatLng(32.777771, 35.027179),
    	     new google.maps.LatLng(32.778053, 35.026669),
    	     new google.maps.LatLng(32.778166, 35.026747)
    	     ]
     });
     google.maps.event.addListener(btfe, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.778037, 35.026599),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     btfe.setMap(map);
     
//Physics Bldg
     var phyc = new google.maps.Polygon({
    	 id: 'phyc',
    	 path: [
    	     new google.maps.LatLng(32.776774, 35.025811),
    	     new google.maps.LatLng(32.777226, 35.025063),
    	     new google.maps.LatLng(32.776966, 35.024733),
    	     new google.maps.LatLng(32.77689, 35.024802),
    	     new google.maps.LatLng(32.777108, 35.025087),
    	     new google.maps.LatLng(32.776939, 35.025398),
    	     new google.maps.LatLng(32.776752, 35.025253),
    	     new google.maps.LatLng(32.77689, 35.024998),
    	     new google.maps.LatLng(32.776826, 35.024945),
    	     new google.maps.LatLng(32.776614, 35.025301),
    	     new google.maps.LatLng(32.776486, 35.025242),
    	     new google.maps.LatLng(32.77633, 35.025543),
    	     new google.maps.LatLng(32.776484, 35.025717),
    	     new google.maps.LatLng(32.776693, 35.025336),
    	     new google.maps.LatLng(32.776887, 35.025489),
    	     new google.maps.LatLng(32.776716,35.025757)
    	     ]
     });
     google.maps.event.addListener(phyc, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.776596, 35.025347),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     phyc.setMap(map);
     
//Electrical Eng Meyer Bldg
     var eemb = new google.maps.Polygon({
    	 id: 'eemb',
    	 path: [
    	     new google.maps.LatLng(32.776488, 35.024652),
    	     new google.maps.LatLng(32.776267,35.024413),
    	     new google.maps.LatLng(32.776073,35.024636),
    	     new google.maps.LatLng(32.776109,35.024684),
    	     new google.maps.LatLng(32.775954,35.024859),
    	     new google.maps.LatLng(32.775868,35.024765),
    	     new google.maps.LatLng(32.775624,35.02506),
    	     new google.maps.LatLng(32.775724,35.025181),
    	     new google.maps.LatLng(32.775868,35.025001),
    	     new google.maps.LatLng(32.776028,35.025189)
    	     ]
     });
     google.maps.event.addListener(eemb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.776114,35.024802),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     eemb.setMap(map);
     
//Electrical Eng Fischbach Bldg
     var eefb = new google.maps.Polygon({
    	 id: 'eefb',
    	 path: [
    	     new google.maps.LatLng(32.776921, 35.024003),
    	     new google.maps.LatLng(32.776754, 35.023805),
    	     new google.maps.LatLng(32.776637, 35.023933),
    	     new google.maps.LatLng(32.776576, 35.023869),
    	     new google.maps.LatLng(32.77624, 35.024258),
    	     new google.maps.LatLng(32.776211, 35.024239),
    	     new google.maps.LatLng(32.776069, 35.024403),
    	     new google.maps.LatLng(32.776109, 35.024454),
    	     new google.maps.LatLng(32.776213, 35.024338),
    	     new google.maps.LatLng(32.776477,35.024615),
    	     new google.maps.LatLng(32.77682, 35.024212),
    	     new google.maps.LatLng(32.776784, 35.024161)
    	     ]
     });
     google.maps.event.addListener(eefb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.776572, 35.024191),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     eefb.setMap(map);
     
//Education in Technology and Science Bldg
     var etsb = new google.maps.Polygon({
    	 id: 'etsb',
    	 path: [
    	     new google.maps.LatLng(32.776491, 35.027393),
    	     new google.maps.LatLng(32.776417, 35.027337),
    	     new google.maps.LatLng(32.776586, 35.027012),
    	     new google.maps.LatLng(32.776527, 35.026961),
    	     new google.maps.LatLng(32.776608, 35.026838),
    	     new google.maps.LatLng(32.776841, 35.027007),
    	     new google.maps.LatLng(32.776773, 35.027125),
    	     new google.maps.LatLng(32.776629, 35.02702),
    	     new google.maps.LatLng(32.776615, 35.027063),
    	     new google.maps.LatLng(32.776654, 35.027103)
    	     ]
     });
     google.maps.event.addListener(etsb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.776527, 35.027211),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     etsb.setMap(map);

//Civil Engineering Rabin Bldg
     var cerb = new google.maps.Polygon({
    	 id: 'cerb',
    	 path: [
    	     new google.maps.LatLng(32.778822, 35.022135),
    	     new google.maps.LatLng(32.779098, 35.02251),
    	     new google.maps.LatLng(32.779272, 35.022248),
    	     new google.maps.LatLng(32.779305, 35.022108),
    	     new google.maps.LatLng(32.77894, 35.021947),
    	     new google.maps.LatLng(32.778922,35.022028)
    	     ]
     });
     google.maps.event.addListener(cerb, 'click', function(){
    	 if (marker) { marker.setMap(null); }
    	 getDept(this.id);
    	 marker = new google.maps.Marker({
    	      position: new google.maps.LatLng(32.779033, 35.022162),
    	      map: map,
    	      icon: 'img/university.png'
    	  });	  
     })
     cerb.setMap(map);
     
//Bus Stop One
     var bs1 = new google.maps.Marker({
    	 id: 'bs1',
    	 position: new google.maps.LatLng(32.776735, 35.01982),
    	 map: map,
    	 icon: 'img/bus.png'
     });

//Bus Stop Two
     var bs2 = new google.maps.Marker({
    	 id: 'bs2',
    	 position: new google.maps.LatLng(32.774484, 35.023669),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Three
     var bs3 = new google.maps.Marker({
    	 id: 'bs3',
    	 position: new google.maps.LatLng(32.774611, 35.02437),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Four
     var bs4 = new google.maps.Marker({
    	 id: 'bs4',
    	 position: new google.maps.LatLng(32.774728, 35.025617),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Five
     var bs5 = new google.maps.Marker({
    	 id: 'bs5',
    	 position: new google.maps.LatLng(32.775974, 35.027351),
    	 map: map,
    	 icon: 'img/bus.png'
     });

//Bus Stop Six
     var bs6 = new google.maps.Marker({
    	 id: 'bs6',
    	 position: new google.maps.LatLng(32.776967, 35.028544),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Seven
     var bs4 = new google.maps.Marker({
    	 id: 'bs7',
    	 position: new google.maps.LatLng(32.778607, 35.027212),
    	 map: map,
    	 icon: 'img/bus.png'
     });

//Bus Stop Eight
     var bs8 = new google.maps.Marker({
    	 id: 'bs8',
    	 position: new google.maps.LatLng(32.78028, 35.024689),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Nine
     var bs9 = new google.maps.Marker({
    	 id: 'bs9',
    	 position: new google.maps.LatLng(32.77997, 35.02113),
    	 map: map,
    	 icon: 'img/bus.png'
     });
     
//Bus Stop Ten
     var bs10 = new google.maps.Marker({
    	 id: 'bs10',
    	 position: new google.maps.LatLng(32.779026, 35.019622),
    	 map: map,
    	 icon: 'img/bus.png'
     });
}